package com.april.pattern.creational.factory.simplefactory;

/**
 * 生产Video
 *
 * @author April
 * @version V1.0.0
 * @date 2019/06/22 19:57
 * @description 简单工厂模式
 */
public class VideoFactory {
    public AbstractVideo getVideo(String videoName) {
        if ("java".equals(videoName)) {
            return new JavaVideo();
        } else if ("go".equals(videoName)) {
            return new GoVideo();
        }

        return null;
    }
}
